#! /bin/bash

echo "this is a test suite"

pass=0
fail=0
expected=""
actual=""

echo "test case 1" 
java -jar Grades.jar 30 30 
expected="Fail"
actual="fail"
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi


echo "test case 2"
java -jar Grades.jar 40 40
expected="Pass"
actual="pass"
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

 echo "test case 3"
java -jar Grades.jar 50 50
expected="Pass"
actual="pass"
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "test case 4"
java -jar Grades.jar 100 100
expected="Pass with distinction"
actual="pass"
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "test case 5"
java -jar Grades.jar 40 50
expected="Fail"
actual="pass
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "test case 6"
java -jar Grades.jar 20 50
expected="Component fail"
actual="pass"
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "Stastisics"
echo "Pass" $pass
echo "Fails" $fail
